module.exports = function print(studentArr,studentidArr){
    let str = '';
    for(let ItemID of studentidArr){
        for(let itemobj of studentArr){
            if(ItemID === itemobj.id){
                let sum = parseInt(itemobj.score.Math) + parseInt(itemobj.score.Chi) +parseInt(itemobj.score.Eng) + parseInt(itemobj.score.Code);
                let average = (sum / 4).toFixed(1)
                str += `${itemobj.name}|${itemobj.score.Math}|${itemobj.score.Chi}|${itemobj.score.Eng}|${itemobj.score.Code}|${average}|${sum}\n`;
            }
        }
    }
    console.log(`姓名|数学|语文|英语|编程|平均分|总分\n`+
    `========================\n`+
    `${str}`+
    `========================\n`+
    `全班总分平均数：xxx\n`+
    `全班总分中位数：xxx\n`);

    return 0;
}